/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import com.google.common.collect.Lists;
/*     */ import com.google.common.collect.Sets;
/*     */ import java.io.IOException;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.Set;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.FontRenderer;
/*     */ import net.minecraft.client.gui.ScaledResolution;
/*     */ import net.minecraft.client.gui.inventory.GuiContainer;
/*     */ import net.minecraft.client.renderer.GlStateManager;
/*     */ import net.minecraft.client.renderer.OpenGlHelper;
/*     */ import net.minecraft.client.renderer.RenderHelper;
/*     */ import net.minecraft.entity.player.EntityPlayer;
/*     */ import net.minecraft.entity.player.InventoryPlayer;
/*     */ import net.minecraft.init.Items;
/*     */ import net.minecraft.inventory.ClickType;
/*     */ import net.minecraft.inventory.Container;
/*     */ import net.minecraft.inventory.Slot;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.util.math.MathHelper;
/*     */ import net.minecraft.util.text.TextFormatting;
/*     */ import net.minecraftforge.fml.relauncher.Side;
/*     */ import net.minecraftforge.fml.relauncher.SideOnly;
/*     */ import org.lwjgl.input.Keyboard;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @SideOnly(Side.CLIENT)
/*     */ public abstract class bk
/*     */   extends GuiContainer
/*     */ {
/*     */   public Container e;
/*     */   public Slot x;
/*     */   public Slot a;
/*     */   private Slot p;
/*     */   private boolean n;
/*  60 */   private ItemStack b = ItemStack.field_190927_a;
/*     */   
/*     */   private int v;
/*     */   
/*     */   private int k;
/*     */   
/*     */   private Slot o;
/*     */   private long y;
/*  68 */   private ItemStack h = ItemStack.field_190927_a;
/*     */   private Slot u;
/*     */   private long j;
/*  71 */   public final Set<Slot> c = Sets.newHashSet(); public boolean r;
/*     */   private int f;
/*     */   private int s;
/*     */   private boolean m;
/*     */   private int l;
/*     */   private long t;
/*     */   private Slot d;
/*     */   private int z;
/*     */   private boolean i;
/*     */   private ItemStack q;
/*  81 */   private ItemStack w = ItemStack.field_190927_a; private pi g;
/*     */   
/*     */   public bk(Container container) {
/*  84 */     super(container);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 212 */     this.q = new ItemStack(Items.field_151034_e);
/* 213 */     this.g = null;
/*     */     this.e = container;
/*     */     this.m = true;
/*     */   } public void drawHoverTip(float f, int i, int j) {
/* 217 */     if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.x != null && this.x.func_75216_d()) {
/* 218 */       func_146285_a(this.x.func_75211_c(), i, j);
/*     */       
/*     */       return;
/*     */     } 
/* 222 */     pi pi1 = getHoveredComponent();
/*     */     
/* 224 */     if (isThrough())
/*     */     {
/* 226 */       for (pi pi2 : getHoveredComponents()) {
/* 227 */         if (pi2 instanceof fk) {
/* 228 */           pi1 = pi2;
/*     */         }
/*     */       } 
/*     */     }
/*     */ 
/*     */     
/* 234 */     if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && pi1 instanceof fk) {
/* 235 */       bh bh = ((fk)pi1).w;
/* 236 */       ItemStack itemStack = dh.d.v(bh.z(), isHud()).z();
/* 237 */       if (!itemStack.func_190926_b()) {
/* 238 */         func_146285_a(dh.d.v(bh.z(), isHud()).z(), i, j);
/*     */         
/*     */         return;
/*     */       } 
/*     */     } 
/* 243 */     if (isThrough())
/*     */     {
/* 245 */       for (pi pi2 : getHoveredComponents()) {
/* 246 */         if (pi2.z.size() > 0) {
/* 247 */           pi1 = pi2;
/*     */         }
/*     */       } 
/*     */     }
/*     */ 
/*     */ 
/*     */ 
/*     */     
/* 255 */     if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && pi1 != null && pi1.z.size() > 0) {
/* 256 */       ScaledResolution scaledResolution = pl.g;
/* 257 */       this.field_146294_l = scaledResolution.func_78326_a();
/* 258 */       this.field_146295_m = scaledResolution.func_78328_b();
/*     */       
/* 260 */       if (this.g != pi1) {
/* 261 */         this.q = new ItemStack(Items.field_151034_e);
/*     */       }
/* 263 */       this.g = pi1;
/* 264 */       this.q.func_151001_c("DragonCore_ToolTip_" + pi1.xa.getName());
/*     */       
/* 266 */       FontRenderer fontRenderer = (Minecraft.func_71410_x()).field_71466_p;
/* 267 */       List<String> list1 = pi1.getTipStringTexts();
/*     */       
/* 269 */       List<String> list2 = new ArrayList();
/* 270 */       for (String str : list1) {
/* 271 */         list2.addAll(sk.v(str, 0, (String)null));
/*     */       }
/*     */       
/* 274 */       list1.clear();
/*     */ 
/*     */       
/* 277 */       for (String str : list2) {
/* 278 */         int k = str.indexOf("container_");
/* 279 */         if (k != -1) {
/* 280 */           String str1 = str.substring(k + 10);
/*     */           try {
/* 282 */             Integer.parseInt(str1);
/* 283 */             fj<ItemStack, String> fj = dh.d.v(str, isHud());
/* 284 */             list1.addAll(ve.z(fj.z()));
/* 285 */           } catch (NumberFormatException numberFormatException) {
/* 286 */             fj<ItemStack, String> fj = dh.d.v(str1, isHud());
/* 287 */             list1.addAll(ve.z(fj.z()));
/*     */           } 
/*     */           continue;
/*     */         } 
/* 291 */         list1.add(str);
/*     */       } 
/*     */       
/* 294 */       list1.replaceAll(a -> a.replace("&", "§"));
/*     */       
/* 296 */       if (v(list1)) {
/*     */         return;
/*     */       }
/* 299 */       ve.v(this.q, list1);
/*     */       
/* 301 */       jo.v(this.q, list1, i, j, this.field_146294_l, this.field_146295_m, -1, fontRenderer);
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73866_w_() {
/*     */     this.field_146297_k = Minecraft.func_71410_x();
/*     */     Keyboard.enableRepeatEvents(true);
/*     */     this.field_146297_k.field_71439_g.field_71070_bA = this.e;
/*     */     this.field_146289_q = this.field_146297_k.field_71466_p;
/*     */     this.field_146296_j = this.field_146297_k.func_175599_af();
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public fj<ItemStack, String> getSlotItemStack(Slot slot) {
/* 327 */     if (!slot.func_111238_b()) {
/* 328 */       return new fj<>(ItemStack.field_190927_a, null);
/*     */     }
/*     */     
/* 331 */     ItemStack itemStack1 = slot.func_75211_c();
/* 332 */     boolean bool1 = false;
/* 333 */     boolean bool2 = (slot == this.p && !this.b.func_190926_b() && !this.n);
/* 334 */     ItemStack itemStack2 = this.field_146297_k.field_71439_g.field_71071_by.func_70445_o();
/* 335 */     String str = null;
/*     */     
/* 337 */     if (slot == this.p && !this.b.func_190926_b() && this.n && !itemStack1.func_190926_b()) {
/* 338 */       itemStack1 = itemStack1.func_77946_l();
/* 339 */       itemStack1.func_190920_e(itemStack1.func_190916_E() / 2);
/* 340 */     } else if (this.r && this.c.contains(slot) && !itemStack2.func_190926_b()) {
/* 341 */       if (this.c.size() == 1) {
/* 342 */         return new fj<>(ItemStack.field_190927_a, null);
/*     */       }
/*     */       
/* 345 */       if (Container.func_94527_a(slot, itemStack2, true) && this.e.func_94531_b(slot)) {
/* 346 */         itemStack1 = itemStack2.func_77946_l();
/* 347 */         bool1 = true;
/* 348 */         Container.func_94525_a(this.c, this.f, itemStack1, slot.func_75211_c().func_190926_b() ? 0 : slot.func_75211_c().func_190916_E());
/* 349 */         int i = Math.min(itemStack1.func_77976_d(), slot.func_178170_b(itemStack1));
/*     */         
/* 351 */         if (itemStack1.func_190916_E() > i) {
/* 352 */           str = TextFormatting.YELLOW.toString() + i;
/* 353 */           itemStack1.func_190920_e(i);
/*     */         } 
/*     */       } else {
/* 356 */         this.c.remove(slot);
/* 357 */         v();
/*     */       } 
/*     */     } 
/* 360 */     if (bool2) {
/* 361 */       return fj.v(ItemStack.field_190927_a, null);
/*     */     }
/* 363 */     if (bool1) {
/* 364 */       if (str == null) {
/* 365 */         str = String.valueOf(itemStack1.func_190916_E());
/*     */       }
/* 367 */       str = str + "§c";
/*     */     } 
/*     */     
/* 370 */     return fj.v(itemStack1, str);
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73863_a(int i, int j, float f) {
/*     */     GlStateManager.func_179101_C();
/*     */     RenderHelper.func_74518_a();
/*     */     GlStateManager.func_179140_f();
/*     */     GlStateManager.func_179097_i();
/*     */     RenderHelper.func_74520_c();
/*     */     GlStateManager.func_179094_E();
/*     */     GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/*     */     GlStateManager.func_179091_B();
/*     */     this.x = z(i, j);
/*     */     this.a = v(i, j);
/*     */     OpenGlHelper.func_77475_a(OpenGlHelper.field_77476_b, 240.0F, 240.0F);
/*     */     GlStateManager.func_179131_c(1.0F, 1.0F, 1.0F, 1.0F);
/*     */     RenderHelper.func_74518_a();
/*     */     func_146979_b(i, j);
/*     */     RenderHelper.func_74520_c();
/*     */     InventoryPlayer inventoryPlayer = this.field_146297_k.field_71439_g.field_71071_by;
/*     */     ItemStack itemStack = this.b.func_190926_b() ? inventoryPlayer.func_70445_o() : this.b;
/*     */     if (!itemStack.func_190926_b()) {
/*     */       int k = 8;
/*     */       int m = this.b.func_190926_b() ? 8 : 16;
/*     */       String str = null;
/*     */       if (!this.b.func_190926_b() && this.n) {
/*     */         itemStack = itemStack.func_77946_l();
/*     */         itemStack.func_190920_e(MathHelper.func_76123_f(itemStack.func_190916_E() / 2.0F));
/*     */       } else if (this.r && this.c.size() > 1) {
/*     */         itemStack = itemStack.func_77946_l();
/*     */         itemStack.func_190920_e(this.l);
/*     */         if (itemStack.func_190926_b()) {
/*     */           str = "" + TextFormatting.YELLOW + "0";
/*     */         }
/*     */       } 
/*     */       GlStateManager.func_179094_E();
/*     */       GlStateManager.func_179109_b((i - 8 + 8), (j - m + 8), 0.0F);
/*     */       double d = getCurrentItemScale().z() / 16.0D;
/*     */       GlStateManager.func_179139_a(d, d, 1.0D);
/*     */       GlStateManager.func_179109_b(-8.0F, -8.0F, 0.0F);
/*     */       v(itemStack, 0, 0, str);
/*     */       GlStateManager.func_179121_F();
/*     */     } 
/*     */     if (!this.h.func_190926_b()) {
/*     */       float f1 = (float)(Minecraft.func_71386_F() - this.y) / 100.0F;
/*     */       if (f1 >= 1.0F) {
/*     */         f1 = 1.0F;
/*     */         this.h = ItemStack.field_190927_a;
/*     */       } 
/*     */       int k = this.o.field_75223_e - this.v;
/*     */       int m = this.o.field_75221_f - this.k;
/*     */       int n = this.v + (int)(k * f1);
/*     */       int i1 = this.k + (int)(m * f1);
/*     */       v(this.h, n, i1, (String)null);
/*     */     } 
/*     */     GlStateManager.func_179121_F();
/*     */     GlStateManager.func_179145_e();
/*     */     GlStateManager.func_179126_j();
/*     */     RenderHelper.func_74519_b();
/*     */   }
/*     */ 
/*     */   
/*     */   public void func_146979_b(int i, int j) {}
/*     */ 
/*     */   
/*     */   public void func_146976_a(float f, int i, int j) {}
/*     */ 
/*     */   
/*     */   public void func_73864_a(int i, int j, int k) throws IOException {
/* 441 */     boolean bool = this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(k - 100);
/* 442 */     Slot slot = v(i, j);
/* 443 */     long l = Minecraft.func_71386_F();
/* 444 */     this.i = (this.d == slot && l - this.t < 250L && this.z == k);
/* 445 */     this.m = false;
/*     */     
/* 447 */     if (k == 0 || k == 1 || bool) {
/*     */       
/* 449 */       boolean bool1 = hasClickedOutside(i, j);
/* 450 */       if (slot != null) bool1 = false; 
/* 451 */       int m = -1;
/*     */       
/* 453 */       if (slot != null) {
/* 454 */         m = slot.field_75222_d;
/*     */       }
/*     */       
/* 457 */       if (bool1) {
/* 458 */         m = -999;
/*     */       }
/*     */       
/* 461 */       if (this.field_146297_k.field_71474_y.field_85185_A && bool1 && this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
/* 462 */         this.field_146297_k.func_147108_a(null);
/*     */         
/*     */         return;
/*     */       } 
/* 466 */       if (m != -1) {
/* 467 */         if (this.field_146297_k.field_71474_y.field_85185_A) {
/* 468 */           if (slot != null && slot.func_75216_d()) {
/* 469 */             this.p = slot;
/* 470 */             this.b = ItemStack.field_190927_a;
/* 471 */             this.n = (k == 1);
/*     */           } else {
/* 473 */             this.p = null;
/*     */           } 
/* 475 */         } else if (!this.r) {
/*     */ 
/*     */           
/* 478 */           if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
/*     */ 
/*     */             
/* 481 */             if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(k - 100)) {
/* 482 */               func_184098_a(slot, m, k, ClickType.CLONE);
/*     */             } else {
/* 484 */               boolean bool2 = (m != -999 && (Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54)));
/* 485 */               ClickType clickType = ClickType.PICKUP;
/*     */               
/* 487 */               if (bool2) {
/* 488 */                 this.w = (slot != null && slot.func_75216_d()) ? slot.func_75211_c().func_77946_l() : ItemStack.field_190927_a;
/* 489 */                 clickType = ClickType.QUICK_MOVE;
/* 490 */               } else if (m == -999) {
/* 491 */                 clickType = ClickType.THROW;
/*     */               } 
/*     */               
/* 494 */               func_184098_a(slot, m, k, clickType);
/*     */             } 
/*     */             
/* 497 */             this.m = true;
/*     */           }
/*     */           else {
/*     */             
/* 501 */             this.r = true;
/* 502 */             this.s = k;
/* 503 */             this.c.clear();
/*     */             
/* 505 */             if (k == 0) {
/* 506 */               this.f = 0;
/* 507 */             } else if (k == 1) {
/* 508 */               this.f = 1;
/* 509 */             } else if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(k - 100)) {
/* 510 */               this.f = 2;
/*     */             } 
/*     */           } 
/*     */         } 
/*     */       }
/*     */     } 
/*     */     
/* 517 */     this.d = slot;
/* 518 */     this.t = l;
/* 519 */     this.z = k;
/*     */   }
/*     */   
/*     */   public boolean hasClickedOutside(int i, int j) {
/* 523 */     if (isHud()) return false; 
/* 524 */     return (getHoveredComponent() == null);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_146273_a(int i, int j, int k, long l) {
/* 532 */     Slot slot = v(i, j);
/* 533 */     ItemStack itemStack = this.field_146297_k.field_71439_g.field_71071_by.func_70445_o();
/*     */     
/* 535 */     if (this.p != null && this.field_146297_k.field_71474_y.field_85185_A) {
/* 536 */       if (k == 0 || k == 1) {
/* 537 */         if (this.b.func_190926_b()) {
/* 538 */           if (slot != this.p && !this.p.func_75211_c().func_190926_b()) {
/* 539 */             this.b = this.p.func_75211_c().func_77946_l();
/*     */           }
/* 541 */         } else if (this.b.func_190916_E() > 1 && slot != null && Container.func_94527_a(slot, this.b, false)) {
/* 542 */           long l1 = Minecraft.func_71386_F();
/*     */           
/* 544 */           if (this.u == slot) {
/* 545 */             if (l1 - this.j > 500L) {
/* 546 */               func_184098_a(this.p, this.p.field_75222_d, 0, ClickType.PICKUP);
/* 547 */               func_184098_a(slot, slot.field_75222_d, 1, ClickType.PICKUP);
/* 548 */               func_184098_a(this.p, this.p.field_75222_d, 0, ClickType.PICKUP);
/* 549 */               this.j = l1 + 750L;
/* 550 */               this.b.func_190918_g(1);
/*     */             } 
/*     */           } else {
/* 553 */             this.u = slot;
/* 554 */             this.j = l1;
/*     */           } 
/*     */         } 
/*     */       }
/* 558 */     } else if (this.r && slot != null && !itemStack.func_190926_b() && (itemStack.func_190916_E() > this.c.size() || this.f == 2) && Container.func_94527_a(slot, itemStack, true) && slot.func_75214_a(itemStack) && this.e.func_94531_b(slot)) {
/* 559 */       this.c.add(slot);
/* 560 */       v();
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_146286_b(int i, int j, int k) {
/* 568 */     Slot slot = v(i, j);
/*     */     
/* 570 */     boolean bool = hasClickedOutside(i, j);
/* 571 */     if (slot != null) bool = false; 
/* 572 */     int m = -1;
/*     */     
/* 574 */     if (slot != null) {
/* 575 */       m = slot.field_75222_d;
/*     */     }
/*     */     
/* 578 */     if (bool) {
/* 579 */       m = -999;
/*     */     }
/*     */     
/* 582 */     if (this.i && slot != null && k == 0 && this.e.func_94530_a(ItemStack.field_190927_a, slot)) {
/* 583 */       if (func_146272_n()) {
/* 584 */         if (!this.w.func_190926_b()) {
/* 585 */           for (Slot slot1 : this.e.field_75151_b) {
/* 586 */             if (slot1 != null && slot1.func_82869_a((EntityPlayer)this.field_146297_k.field_71439_g) && slot1.func_75216_d() && slot1.isSameInventory(slot) && Container.func_94527_a(slot1, this.w, true)) {
/* 587 */               func_184098_a(slot1, slot1.field_75222_d, k, ClickType.QUICK_MOVE);
/*     */             }
/*     */           } 
/*     */         }
/*     */       } else {
/* 592 */         func_184098_a(slot, m, k, ClickType.PICKUP_ALL);
/*     */       } 
/*     */       
/* 595 */       this.i = false;
/* 596 */       this.t = 0L;
/*     */     } else {
/* 598 */       if (this.r && this.s != k) {
/* 599 */         this.r = false;
/* 600 */         this.c.clear();
/* 601 */         this.m = true;
/*     */         
/*     */         return;
/*     */       } 
/* 605 */       if (this.m) {
/* 606 */         this.m = false;
/*     */         
/*     */         return;
/*     */       } 
/* 610 */       if (this.p != null && this.field_146297_k.field_71474_y.field_85185_A) {
/* 611 */         if (k == 0 || k == 1) {
/* 612 */           if (this.b.func_190926_b() && slot != this.p) {
/* 613 */             this.b = this.p.func_75211_c();
/*     */           }
/*     */           
/* 616 */           boolean bool1 = Container.func_94527_a(slot, this.b, false);
/*     */           
/* 618 */           if (m != -1 && !this.b.func_190926_b() && bool1) {
/* 619 */             func_184098_a(this.p, this.p.field_75222_d, k, ClickType.PICKUP);
/* 620 */             func_184098_a(slot, m, 0, ClickType.PICKUP);
/*     */             
/* 622 */             if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
/* 623 */               this.h = ItemStack.field_190927_a;
/*     */             } else {
/* 625 */               func_184098_a(this.p, this.p.field_75222_d, k, ClickType.PICKUP);
/* 626 */               this.v = i;
/* 627 */               this.k = j;
/* 628 */               this.o = this.p;
/* 629 */               this.h = this.b;
/* 630 */               this.y = Minecraft.func_71386_F();
/*     */             } 
/* 632 */           } else if (!this.b.func_190926_b()) {
/* 633 */             this.v = i;
/* 634 */             this.k = j;
/* 635 */             this.o = this.p;
/* 636 */             this.h = this.b;
/* 637 */             this.y = Minecraft.func_71386_F();
/*     */           } 
/*     */           
/* 640 */           this.b = ItemStack.field_190927_a;
/* 641 */           this.p = null;
/*     */         } 
/* 643 */       } else if (this.r && !this.c.isEmpty()) {
/* 644 */         func_184098_a((Slot)null, -999, Container.func_94534_d(0, this.f), ClickType.QUICK_CRAFT);
/*     */         
/* 646 */         for (Slot slot1 : this.c) {
/* 647 */           func_184098_a(slot1, slot1.field_75222_d, Container.func_94534_d(1, this.f), ClickType.QUICK_CRAFT);
/*     */         }
/*     */         
/* 650 */         func_184098_a((Slot)null, -999, Container.func_94534_d(2, this.f), ClickType.QUICK_CRAFT);
/* 651 */       } else if (!this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
/* 652 */         if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(k - 100)) {
/* 653 */           func_184098_a(slot, m, k, ClickType.CLONE);
/*     */         } else {
/* 655 */           boolean bool1 = (m != -999 && (Keyboard.isKeyDown(42) || Keyboard.isKeyDown(54)));
/*     */           
/* 657 */           if (bool1) {
/* 658 */             this.w = (slot != null && slot.func_75216_d()) ? slot.func_75211_c().func_77946_l() : ItemStack.field_190927_a;
/*     */           }
/*     */           
/* 661 */           func_184098_a(slot, m, k, bool1 ? ClickType.QUICK_MOVE : ClickType.PICKUP);
/*     */         } 
/*     */       } 
/*     */     } 
/*     */     
/* 666 */     if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b()) {
/* 667 */       this.t = 0L;
/*     */     }
/*     */     
/* 670 */     this.r = false;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_184098_a(Slot slot, int i, int j, ClickType clickType) {
/* 677 */     if (slot != null) {
/* 678 */       i = slot.field_75222_d;
/*     */     }
/* 680 */     this.field_146297_k.field_71442_b.func_187098_a(this.e.field_75152_c, i, j, clickType, (EntityPlayer)this.field_146297_k.field_71439_g);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73869_a(char c, int i) throws IOException {
/* 688 */     if (this.x == this.a) {
/* 689 */       func_146983_a(i);
/* 690 */       if (this.x != null && this.x.func_75216_d()) {
/* 691 */         if (this.field_146297_k.field_71474_y.field_74322_I.isActiveAndMatches(i)) {
/* 692 */           func_184098_a(this.x, this.x.field_75222_d, 0, ClickType.CLONE);
/* 693 */         } else if (this.field_146297_k.field_71474_y.field_74316_C.isActiveAndMatches(i)) {
/* 694 */           func_184098_a(this.x, this.x.field_75222_d, func_146271_m() ? 1 : 0, ClickType.THROW);
/*     */         } 
/*     */       }
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean func_146983_a(int i) {
/* 706 */     if (this.field_146297_k.field_71439_g.field_71071_by.func_70445_o().func_190926_b() && this.x != null) {
/* 707 */       for (int j = 0; j < 9; j++) {
/* 708 */         if (this.field_146297_k.field_71474_y.field_151456_ac[j].isActiveAndMatches(i)) {
/* 709 */           func_184098_a(this.x, this.x.field_75222_d, j, ClickType.SWAP);
/* 710 */           return true;
/*     */         } 
/*     */       } 
/*     */     }
/*     */     
/* 715 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_146281_b() {
/* 722 */     if (this.field_146297_k.field_71439_g != null) {
/* 723 */       this.e.func_75134_a((EntityPlayer)this.field_146297_k.field_71439_g);
/*     */     }
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean func_73868_f() {
/* 731 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void func_73876_c() {
/* 738 */     if (getMatch().equals("GuiGameOver"))
/*     */       return; 
/* 740 */     if (!this.field_146297_k.field_71439_g.func_70089_S() || this.field_146297_k.field_71439_g.field_70128_L) {
/* 741 */       this.field_146297_k.field_71439_g.func_71053_j();
/*     */     }
/*     */   }
/*     */   
/*     */   public Slot getSlotUnderMouse() {
/* 746 */     return this.x;
/*     */   }
/*     */   
/*     */   public abstract Map<String, pi> getComponents();
/*     */   
/*     */   public abstract pi getHoveredComponent();
/*     */   
/*     */   public abstract List<pi> getHoveredComponents();
/*     */   
/*     */   public abstract bh getCurrentItemScale();
/*     */   
/*     */   public abstract boolean isHud();
/*     */   
/*     */   public abstract boolean isThrough();
/*     */   
/*     */   public abstract String getMatch();
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\bk.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */